package com.diapoclic.entity;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.Set;


/**
 * The persistent class for the User database table.
 * 
 */
@Entity
public class User implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="id_user")
	private int idUser;

    @Temporal( TemporalType.DATE)
	@Column(name="date_last_connect")
	private Date dateLastConnect;

    @Temporal( TemporalType.DATE)
	@Column(name="date_registration")
	private Date dateRegistration;

	@Column(name="firstname_user")
	private String firstnameUser;

	private String login;

	private String mail;

	@Column(name="name_user")
	private String nameUser;

	private String password;

	//bi-directional many-to-one association to Document
	@OneToMany(mappedBy="user")
	private Set<Document> documents;

	//bi-directional many-to-one association to Folder
	@OneToMany(mappedBy="user")
	private Set<Folder> folders;

	//bi-directional many-to-one association to FolderShared
	@OneToMany(mappedBy="user")
	private Set<FolderShared> folderShareds;

	//bi-directional many-to-one association to Friend
	@OneToMany(mappedBy="user")
	private Set<Friend> friends;

    public User() {
    }

	public int getIdUser() {
		return this.idUser;
	}

	public void setIdUser(int idUser) {
		this.idUser = idUser;
	}

	public Date getDateLastConnect() {
		return this.dateLastConnect;
	}

	public void setDateLastConnect(Date dateLastConnect) {
		this.dateLastConnect = dateLastConnect;
	}

	public Date getDateRegistration() {
		return this.dateRegistration;
	}

	public void setDateRegistration(Date dateRegistration) {
		this.dateRegistration = dateRegistration;
	}

	public String getFirstnameUser() {
		return this.firstnameUser;
	}

	public void setFirstnameUser(String firstnameUser) {
		this.firstnameUser = firstnameUser;
	}

	public String getLogin() {
		return this.login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	public String getMail() {
		return this.mail;
	}

	public void setMail(String mail) {
		this.mail = mail;
	}

	public String getNameUser() {
		return this.nameUser;
	}

	public void setNameUser(String nameUser) {
		this.nameUser = nameUser;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Set<Document> getDocuments() {
		return this.documents;
	}

	public void setDocuments(Set<Document> documents) {
		this.documents = documents;
	}
	
	public Set<Folder> getFolders() {
		return this.folders;
	}

	public void setFolders(Set<Folder> folders) {
		this.folders = folders;
	}
	
	public Set<FolderShared> getFolderShareds() {
		return this.folderShareds;
	}

	public void setFolderShareds(Set<FolderShared> folderShareds) {
		this.folderShareds = folderShareds;
	}
	
	public Set<Friend> getFriends() {
		return this.friends;
	}

	public void setFriends(Set<Friend> friends) {
		this.friends = friends;
	}
	
}